﻿using AuthCenter.API.Application.Command.Account;
using AuthCenter.API.Application.Command.AccountRole;
using AuthCenter.API.Application.Command.Menu;
using AuthCenter.API.Application.Command.Request;
using AuthCenter.API.Application.Command.Role;
using AuthCenter.API.DTOs;
using AuthCenter.Domain.Account;
using AuthCenter.Domain.Menu;
using AuthCenter.Domain.Request;
using AutoMapper;

namespace AuthCenter.API
{
    public class MyAutoMapper : Profile
    {
        public MyAutoMapper()
        {
            CreateMap<CreateAccountCommand,AccountModel>().ReverseMap();
            CreateMap<UpdateAccountCommand, AccountModel>().ReverseMap();
            CreateMap<CreateRoleCommand, RoleModel>().ReverseMap();
            CreateMap<UpdateRoleCommand, RoleModel>().ReverseMap();
            CreateMap<CreateAccountRoleCommand, AccountRoleModel>().ReverseMap();
            CreateMap<AccountRoleModel, AccountRoleDTO>().ReverseMap();
            CreateMap<AccountModel, AccountDTO>().ReverseMap();
            CreateMap<CreateMenuCommand, MenuModel>().ReverseMap();
            CreateMap<UpdateMenuCommand, MenuModel>().ReverseMap();
            CreateMap<MenuDTO, MenuModel>().ReverseMap();
            CreateMap<ParentMenuDTO, MenuModel>().ReverseMap();
            CreateMap<RoleMenuDTO, RoleMenuModel>().ReverseMap();
            CreateMap<CreateRequestCommand, RequestModel>().ReverseMap();
            CreateMap<RequestDTO, RequestModel>().ReverseMap();
            CreateMap<UpdateRequestCommand, RequestModel>().ReverseMap();
            CreateMap<UpdStateRequestCommand, RequestModel>().ReverseMap();
        }
    }
}
